$iconHome: (0px, 142px, 0px, -142px, 31px, 31px, 189px, 173px, '../images/sprites/sprite.png', 'icon-home', );
$iconHome2: (39px, 142px, -39px, -142px, 31px, 31px, 189px, 173px, '../images/sprites/sprite.png', 'icon-home2', );
$iconIndex1: (55px, 0px, -55px, 0px, 40px, 43px, 189px, 173px, '../images/sprites/sprite.png', 'icon-index1', );
$iconIndex2: (0px, 0px, 0px, 0px, 47px, 41px, 189px, 173px, '../images/sprites/sprite.png', 'icon-index2', );
$iconIndex3: (103px, 0px, -103px, 0px, 44px, 37px, 189px, 173px, '../images/sprites/sprite.png', 'icon-index3', );
$iconIndex4: (0px, 49px, 0px, -49px, 43px, 43px, 189px, 173px, '../images/sprites/sprite.png', 'icon-index4', );
$iconIndex5: (103px, 45px, -103px, -45px, 37px, 37px, 189px, 173px, '../images/sprites/sprite.png', 'icon-index5', );
$iconIndex6: (55px, 51px, -55px, -51px, 38px, 35px, 189px, 173px, '../images/sprites/sprite.png', 'icon-index6', );
$iconStep1On: (0px, 100px, 0px, -100px, 35px, 34px, 189px, 173px, '../images/sprites/sprite.png', 'icon-step1-on', );
$iconStep1: (43px, 100px, -43px, -100px, 35px, 34px, 189px, 173px, '../images/sprites/sprite.png', 'icon-step1', );
$iconStep2On: (155px, 42px, -155px, -42px, 32px, 36px, 189px, 173px, '../images/sprites/sprite.png', 'icon-step2-on', );
$iconStep2: (155px, 86px, -155px, -86px, 32px, 36px, 189px, 173px, '../images/sprites/sprite.png', 'icon-step2', );
$iconStep3On: (86px, 100px, -86px, -100px, 34px, 34px, 189px, 173px, '../images/sprites/sprite.png', 'icon-step3-on', );
$iconStep3: (155px, 0px, -155px, 0px, 34px, 34px, 189px, 173px, '../images/sprites/sprite.png', 'icon-step3', );
$iconUser: (78px, 142px, -78px, -142px, 30px, 30px, 189px, 173px, '../images/sprites/sprite.png', 'icon-user', );
$spritesheetSprites: ($iconHome, $iconHome2, $iconIndex1, $iconIndex2, $iconIndex3, $iconIndex4, $iconIndex5, $iconIndex6, $iconStep1On, $iconStep1, $iconStep2On, $iconStep2, $iconStep3On, $iconStep3, $iconUser, );
$spritesheet: (189px, 173px, 'sprite.png', $spritesheetSprites, );

@mixin sprite-width($sprite) {
  width: nth($sprite, 5);
}

@mixin sprite-height($sprite) {
  height: nth($sprite, 6);
}

@mixin sprite-position($sprite) {
  $sprite-offset-x: nth($sprite, 3);
  $sprite-offset-y: nth($sprite, 4);
  background-position: $sprite-offset-x  $sprite-offset-y;
}

@mixin sprite-image($sprite) {
  $sprite-image: nth($sprite, 9);
  background-image: url(#{$sprite-image});
}

@mixin sprite($sprite) {
  @include sprite-image($sprite);
  @include sprite-position($sprite);
  @include sprite-width($sprite);
  @include sprite-height($sprite);
}

@mixin sprites($sprites) {
  @each $sprite in $sprites {
    $sprite-name: nth($sprite, 10);
    .#{$sprite-name} {
      @include sprite($sprite);
    }
  }
}
